home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / GEMFBIND / AESFSEL3.S < prev    next >
Text File  |  1993-03-26  |  3KB  |  72 lines

  1.  
  2. ;*========================================================================
  3. ;*
  4. ;* AESFAST Public Domain GEM bindings.
  5. ;*    Maintenance:
  6. ;*     04/07/89 v1.2: This source file is new with this version.
  7. ;*              Also, the calculation of the location of the prompt on the
  8. ;*              screen has been changed.    It was placed one boxchar height
  9. ;*              down on the screen, putting it right below the menu bar.
  10. ;*              This didn't look too good on a big-monitor system, so now
  11. ;*              it is calculated by centering the box, then subtracting a
  12. ;*              fixed offset from the centered Y to make it appear right
  13. ;*              above the fsel'er box.  The offset is 9 character heights,
  14. ;*              (plus 2 extra char heights for the prompt itself), less
  15. ;*              2 pixels (just to line everything up real neat).
  16. ;*========================================================================
  17.  
  18. ;*************************************************************************
  19. ;*
  20. ;* Small extended fsel manager routine.
  21. ;*     This version emulates the TOS 1.4 fsel_exinput only to the point of
  22. ;*     putting up a prompt with the dialog.
  23. ;*
  24. ;*************************************************************************
  25.  
  26. ;-------------------------------------------------------------------------
  27. ; fsel_smallexinput
  28. ;-------------------------------------------------------------------------
  29.  
  30.           globl     _fsel_smallexinput
  31. _fsel_smallexinput:
  32.  
  33. ;          .cargs    #8,pinpath.l,pinsel.l,pbutton.l,plabel.l
  34.  
  35. pinpath   =         8
  36. pinsel      =         12
  37. pbutton   =         16
  38. plabel      =         20
  39.  
  40.           link        a6,#-4
  41.  
  42.           move.w    _gl_apversion,d0         ; Check the AES version.  If
  43.           cmp.w     #$0104,d0                 ; it's $0104, we're running
  44.           beq.b     smartaes                 ; on the RAM-based TOS 1.4,
  45.           cmp.w     #$0130,d0                 ; which is smart.    If it's
  46.           bge.b     smartaes                 ; $0130 or higher, it's smart.
  47.           bsr        FselSimu               ; Else go simulate the prompted
  48.           bra.b     return                     ; selector, then return its values.
  49. smartaes:
  50.           move.l    plabel(a6),d0             ; Swap the button and prompt
  51.           move.l    pbutton(a6),plabel(a6)     ; string pointers to make the
  52.           move.l    d0,pbutton(a6)             ; addrin stuff contiguous.
  53.  
  54.           move.l    #$5B000203,d0             ; AControl  91,0,2,3
  55.           moveq.l    #-4,d1                     ; fsel_exinput is a legal function,
  56.           lea        pinpath(a6),a0             ; do it.  a0 -> addrin
  57.           jsr        aes_call                 ; Call AES.
  58.  
  59.           move.l    plabel(a6),d0             ; Swap the prompt string and
  60.           move.l    pbutton(a6),plabel(a6)     ; button pointers back to how
  61.           move.l    d0,pbutton(a6)             ; they were on entry.
  62.  
  63. return:
  64.           move.l    pbutton(a6),a1             ; Return the values from
  65.           move.w    -2(a6),(a1)              ; intout to the caller.
  66.           move.w    -4(a6),d0
  67.  
  68.           unlk        a6
  69.           rts
  70.  
  71. ;          end of code
  72.